import request from '@/utils/request.js'

// 问答记录列表
export function getStatistic(data) {
  return request({
    url: '/statistic/listNoPage',
    method: 'GET',
    params: data,
  })
}

// 高频词查询
export function getHotWord() {
  return request({
    url: '/highFrequencyQuestion/list',
    method: 'GET',
  })
}
//新增问题反映
export function addProblemAPI(data) {
  return request({
    url: '/api/problemFeedback/problem',
    method: 'POST',
    data,
  })
}

//新增派单
export function addDispatchAPI(data) {
  return request({
    url: '/api/problemFeedback/dispatch',
    method: 'POST',
    data,
  })
}

//新增结果
export function addExecutionAPI(data) {
  return request({
    url: '/api/problemFeedback/execution',
    method: 'POST',
    data,
  })
}
//查询问题列表
export function getProblemListAPI(params) {
  return request({
    url: '/api/problemFeedback/problemList',
    method: 'GET',
    params,
  })
}
//查询派单列表
export function getDispatchListAPI(params) {
  return request({
    url: '/api/problemFeedback/dispatchList',
    method: 'GET',
    params,
  })
}
//查询处理列表
export function getExecutionListAPI(params) {
  return request({
    url: '/api/problemFeedback/executionList',
    method: 'GET',
    params,
  })
}
//
//asr测试接口

export function asrAPI(data) {
  return request({
    url: '/api/asr/http',
    method: 'POST',

    data,
  })
}
//
export function ttsAPI(data) {
  return request({
    url: '/api/tts',
    method: 'POST',
    responseType: 'blob',
    data,
  })
}
export function fileUploadAPI(id, data) {
  return request({
    url: '/api/data/' + id,
    method: 'POST',
    data,
    headers: {
      'Content-Type': 'multipart/form-data',
    },
    // timeout: 300000,
  })
}
